package com.lin.community_thumb_sys.controller;

import com.lin.community_thumb_sys.common.BaseResponse;
import com.lin.community_thumb_sys.common.ResultUtils;
import com.lin.community_thumb_sys.model.dto.thumb.DoThumbRequest;
import com.lin.community_thumb_sys.service.ThumbService;
import jakarta.annotation.Resource;
import jakarta.servlet.http.HttpServletRequest;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @version 1.0
 * @Author linzixiong
 * @Data 2025/8/15  15:48
 * @description：点赞
 */

@RestController
@RequestMapping("thumb")
public class ThumbController {
    @Resource
    private ThumbService thumbService;

    @PostMapping("/do")
    public BaseResponse<Boolean> doThumb(@RequestBody DoThumbRequest doThumbRequest, HttpServletRequest request) {
        Boolean success = thumbService.doThumb(doThumbRequest, request);
        return ResultUtils.success(success);
    }
}
